home *** CD-ROM | disk | FTP | other *** search
- ; $VER:Installation script for CharMap
- ; Author: Adapted from Michael Link's script
- ; Begin : 19/11/99
-
- ; Let's begin with the installer script's messages:
- (set DIRHELP (cat "You must enter the name of the directory, in which\n"
- @app-name " shall be installed.\n\n"
- "If you want " @app-name " to be active everytime you\n"
- "start the computer, enter the directory\n"
- "\"SYS:WBStartup\", which is the default directory.\n"
- "You can enter \"SYS:Tools/Commodities\", if you want to\n"
- "use it just sometimes or start it from user-startup.\n"
- )
- )
-
- (set M_WELCOME (cat "Welcome to the installation of " @app-name " v1.6. This little\n"
- "tool can display all the characters of a given font."
- )
- )
-
- (set CHARSET_HELP (cat "The charset indicates how many characters will be displayed\n"
- "at startup, among:\n"
- " · Default: The charset used is adjusted to the one the font uses\n"
- " · 8bits ASCII: All characters, from 0 to 255\n"
- " · ISO Latin1: The characters from 32 to 255 only\n"
- " · Amiga standard: Like ISO Latin1, without the chars from 127 to 159\n"
- "\n\nActually, some fonts (XHelvetica, and so on...) define all\n"
- "possible chars between 0 and 255, but only those definied in\n"
- "the Amiga standard have a meaning graphical symbol. That's why\n"
- "it could be interesting to force the charset to display at\n"
- "startup."
- )
- )
-
- (set GEOMETRY_HELP (cat "This tool-type defined the position of the main and minimized\n"
- "window. It represents a comma separated list of signed numbers.\n"
- "The first two, correspond to the position of the main window, and\n"
- "the next two, to the minimized one. If nothing is given, the\n"
- "position will be centered on screen. Negative values can be\n"
- "enterred, in such case, position is relative to the opposite\n"
- "border is usually refers to."
- )
- )
-
- (set STARTUP_HELP (cat "You can launch this tool directly from the user-startup.\n"
- "In such case, an entry like this this will be inserted:\n"
- "; BEGIN " @app-name "\n"
- "Run >NIL: " @app-name " CX_POPUP=NO ...\n"
- "Parameters will be those you will enterred.\n"
- "you can use a automatic launch by placing the programme\n"
- "and it's icon in the WBStartup drawer of the boot disk, or\n"
- "at last if you want to use it just sometimes, place it in\n"
- "another drawer, like C: or SYS:Tools/Commodities."
- )
- )
-
- (set WHICH_STARTUP "How do you want to start this commodity?")
-
- (set WHICH_CHARSET "Which charset would you like to display at start?")
-
- (set WHICH_SORTING "How do you want to sort the charset at start?")
-
- (set WHICH_CLOSING "What does the window's close gadget do?")
-
- (set WHICH_GEOMETRY "What will be the initial position of the windows?")
-
- (set WHICH_CATALOG "\nWhich language do you want to install ? (in LOCALE:)\n")
-
- (set DIR_REQUEST (cat "Please enter the destination directory for " @app-name ))
-
- (set WHICH_HOTKEY (cat "\n\nWith which key combination shall the\n"
- "window be reopen when it is hiden ?"
- )
- )
-
- (set MSG_COPYLANG "Copying catalog ")
-
- ; Default values:
- (set DEF_DESTDIR "SYS:WBStartup")
- (set DEF_HOTKEY "ctrl lalt c")
- (set DEF_GEOMETRY ",,,")
- (set DEF_CHARSET "0")
- (set DEF_SORTING 1)
- (set DEF_CLOSING 0)
-
- (set vernum (getversion "locale.library" (resident)))
- (set ver (shiftright vernum 16))
-
- ;
- ; Here is the screen where the user's skill is controlled:
- ;
-
- (welcome M_WELCOME)
-
- ; ***********************************************************************
- ; * *
- ; * Request for the destination file (usually user-startup) *
- ; * *
- ; ***********************************************************************
-
- ; Only for expert!
- (if (< @user-level 2)
- (set AUTO 0 DF_BITS 1)
- ( (set DF_BITS (askchoice (prompt WHICH_STARTUP)
- (help STARTUP_HELP)
- (choices "User-Startup"
- "WBStartup drawer"
- "Other directory")
- (default 0)
- )
- )
- ; Place the prog. automatically in WBStartup drawer:
- (set AUTO (= DF_BITS 1))
- ; If the user want to launch it from user-startup, install tool in C:
- (if (= DF_BITS 0) (set DEF_DESTDIR "C:"))
- ; If the user doesn't whant to launch at every boot:
- (if (= DF_BITS 2) (set DEF_DESTDIR "SYS:Tools/Commodities"))
- ))
-
-
- ; ***********************************************************************
- ; * *
- ; * Request for the destination directory *
- ; * *
- ; ***********************************************************************
-
- ; For novice set directory to WBStartup:
- (if (= AUTO 0)
- (if (= @user-level 0)
- (set DIR DEF_DESTDIR)
- (set DIR (askdir (prompt DIR_REQUEST)
- (help DIRHELP)
- (default DEF_DESTDIR)
- )
- )
- )
- (set DIR DEF_DESTDIR)
- )
-
- (set @default-dest DIR)
-
-
- ; ***********************************************************************
- ; * *
- ; * Asking for the tool-types *
- ; * *
- ; ***********************************************************************
-
- ; * HOTKEY *
- (if (= @user-level 0)
- (set HOTKEY DEF_HOTKEY)
-
- (set HOTKEY (askstring (prompt WHICH_HOTKEY)
- (help @askstring-help)
- (default DEF_HOTKEY)
- )
- )
- )
-
- ; * CHARSET *
- (if (= @user-level 0)
- (set CHARSET DEF_CHARSET)
-
- ( (set CS_BITS (askchoice (prompt WHICH_CHARSET)
- (help CHARSET_HELP)
- (choices "8bits ASCII (256 characters)"
- "ISO Latin1 (224)"
- "Amiga Standard (192)"
- "Default (Depends on the font used)")
- (default 3)
- )
- )
- (if (= CS_BITS 0) (set CHARSET "1"))
- (if (= CS_BITS 1) (set CHARSET "2"))
- (if (= CS_BITS 2) (set CHARSET "3"))
- (if (= CS_BITS 3) (set CHARSET "0"))
- ))
-
- ; * SORTING METHOD *
- (if (AND (< @user-level 2) (= DF_BITS 0))
- (set SORTING DEF_SORTING)
- (set SORTING (askchoice (prompt WHICH_SORTING)
- (help @askchoice-help)
- (choices "Vertically" "Horizontally")
- (default DEF_SORTING)
- )
- )
- )
-
- ; * CLOSE GADGET ACTION *
- (if (< @user-level 1)
- (set CLOSING DEF_CLOSING)
- (set CLOSING (askchoice (prompt WHICH_CLOSING)
- (help @askchoice-help)
- (choices "Hides the interface" "Quits the commodity")
- (default DEF_CLOSING)
- )
- )
- )
-
- ; * GEOMETRY (only for expert!) *
- (if (< @user-level 2)
- (set GEOMETRY DEF_GEOMETRY)
- (set GEOMETRY (askstring (prompt WHICH_GEOMETRY)
- (help GEOMETRY_HELP)
- (default DEF_GEOMETRY)
- )
- )
- )
-
- (tooltype (prompt "Writing tool-types ...")
- (help)
- (dest @app-name)
- (settooltype "HOTKEY" HOTKEY)
- (settooltype "CHARSET" CHARSET)
- (settooltype "GEOMETRY" GEOMETRY)
- ; VERTICALSORT & CLOSEQUIT can't be unset due to buggy
- ; routines of Intaller tool...
- ; (if (= CLOSING 0) (settooltype "CLOSEQUIT"))
- ; (if (= SORTING 1) (settooltype "VERTICALSORT"))
- )
-
-
- (if (= DF_BITS 0)
- ( ; The user want to launch it via startup script
- ; Don't copy icon and modify user-startup:
- (copyfiles (prompt (cat "Copying from " @app-name " to " DIR))
- (help @copyfiles-help)
- (source @app-name)
- (dest DIR)
- )
- ; Modify the startup script:
- (set STR_COMMAND (cat "Run >NIL: " @app-name " CX_POPUP=NO CHARSET=" CHARSET " GEOMETRY=" GEOMETRY " HOTKEY=\"" HOTKEY "\""))
- (if (= SORTING 1) (set STR_COMMAND (cat STR_COMMAND " HORIZONTALSORT")))
- (if (= CLOSING 1) (set STR_COMMAND (cat STR_COMMAND " CLOSEQUIT")))
- (set STR_COMMAND (cat STR_COMMAND "\n"))
- (startup @app-name
- (prompt (cat "Inserting command\n" STR_COMMAND "in S:User-Startup file"))
- (help STARTUP_HELP)
- (command STR_COMMAND)
- )
- )
- (copyfiles (prompt (cat "Copying from " @app-name " to " DIR))
- (help @copyfiles-help)
- (source @app-name)
- (dest DIR)
- (infos)
- )
- )
-
-
- ; ***********************************************************************
- ; * *
- ; * Installation of the catalogs *
- ; * *
- ; ***********************************************************************
-
- (if (>= ver 38)
- (
- (set DEF_LANG 0)
- (if (= @language "français") (set DEF_LANG 1))
- (if (= @language "deutsch") (set DEF_LANG 2))
- (if (= @language "español") (set DEF_LANG 4))
- (if (= @language "polski") (set DEF_LANG 8))
- (if (= @language "magyar") (set DEF_LANG 16))
- (if (= @user-level 0)
- (set CATALOGS DEF_LANG)
- (set CATALOGS (askoptions (prompt WHICH_CATALOG)
- (help @askoptions-help)
- (choices "Français" "Deutsch" "Español" "Polski" "Magyar")
- (default DEF_LANG)
- )
- )
- )
- (if (BITAND CATALOGS 1)
- (copyfiles (prompt (cat MSG_COPYLANG "French..."))
- (help @copyfiles-help)
- (source "catalogs/français/CharMap.catalog")
- (dest "LOCALE:Catalogs/français")
- )
- )
- (if (BITAND CATALOGS 2)
- (copyfiles (prompt (cat MSG_COPYLANG "German..."))
- (help @copyfiles-help)
- (source "catalogs/deutsch/CharMap.catalog")
- (dest "LOCALE:Catalogs/deutsch")
- )
- )
- (if (BITAND CATALOGS 4)
- (copyfiles (prompt (cat MSG_COPYLANG "Spanish..."))
- (help @copyfiles-help)
- (source "catalogs/español/CharMap.catalog")
- (dest "LOCALE:Catalogs/español")
- )
- )
- (if (BITAND CATALOGS 8)
- (copyfiles (prompt (cat MSG_COPYLANG "Polski..."))
- (help @copyfiles-help)
- (source "catalogs/polski/CharMap.catalog")
- (dest "LOCALE:Catalogs/polski")
- )
- )
- (if (BITAND CATALOGS 16)
- (copyfiles (prompt (cat MSG_COPYLANG "Magyar..."))
- (help @copyfiles-help)
- (source "catalogs/magyar/CharMap.catalog")
- (dest "LOCALE:Catalogs/magyar")
- )
- )
- )
- )
-
-